<?php
$name = $_POST['name'];
$sex = $_POST['sex'];
echo $name;
echo $sex;

$connent = new mysqli("localhost","root","","form");
if($connent->connect_error){
    die("连接失败：".$connent->connect_error);
}else{
    echo "连接成功";
}

$insertdata = "insert into simple(one,two) values('".$name."','".$sex."')";
if($connent->query($insertdata)==true){
    echo "";
}else{
    echo "Error insert data: " . $connent->error;
}
mysqli_close($connent);
?>